import 'package:jyofservice/bean/delay_data_entity.dart';
import 'package:jyofservice/generated/json/base/json_filed.dart';

delayDataEntityFromJson(DelayDataEntity data, Map<String, dynamic> json) {
	if (json['code'] != null) {
		data.code = json['code'] is String
				? int.tryParse(json['code'])
				: json['code'].toInt();
	}
	if (json['msg'] != null) {
		data.msg = json['msg'].toString();
	}
	if (json['count'] != null) {
		data.count = json['count'] is String
				? int.tryParse(json['count'])
				: json['count'].toInt();
	}
	if (json['data'] != null) {
		data.data = (json['data'] as List).map((v) => DelayDataData().fromJson(v)).toList();
	}
	return data;
}

Map<String, dynamic> delayDataEntityToJson(DelayDataEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['code'] = entity.code;
	data['msg'] = entity.msg;
	data['count'] = entity.count;
	data['data'] =  entity.data?.map((v) => v!.toJson())?.toList();
	return data;
}

delayDataDataFromJson(DelayDataData data, Map<String, dynamic> json) {
	if (json['ID'] != null) {
		data.iD = json['ID'] is String
				? int.tryParse(json['ID'])
				: json['ID'].toInt();
	}
	if (json['LSH'] != null) {
		data.lSH = json['LSH'].toString();
	}
	if (json['User_id'] != null) {
		data.userId = json['User_id'] is String
				? int.tryParse(json['User_id'])
				: json['User_id'].toInt();
	}
	if (json['Reason'] != null) {
		data.reason = json['Reason'].toString();
	}
	if (json['BHReason'] != null) {
		data.bHReason = json['BHReason'];
	}
	if (json['State'] != null) {
		data.state = json['State'] is String
				? int.tryParse(json['State'])
				: json['State'].toInt();
	}
	if (json['Flag'] != null) {
		data.flag = json['Flag'] is String
				? int.tryParse(json['Flag'])
				: json['Flag'].toInt();
	}
	if (json['CreateDate'] != null) {
		data.createDate = json['CreateDate'].toString();
	}
	if (json['CreateUserId'] != null) {
		data.createUserId = json['CreateUserId'] is String
				? int.tryParse(json['CreateUserId'])
				: json['CreateUserId'].toInt();
	}
	if (json['UpdateDate'] != null) {
		data.updateDate = json['UpdateDate'];
	}
	if (json['UpdateUserId'] != null) {
		data.updateUserId = json['UpdateUserId'];
	}
	if (json['All_name'] != null) {
		data.allName = json['All_name'].toString();
	}
	if (json['TypeName'] != null) {
		data.typeName = json['TypeName'].toString();
	}
	if (json['Link_man'] != null) {
		data.linkMan = json['Link_man'].toString();
	}
	if (json['Link_phone'] != null) {
		data.linkPhone = json['Link_phone'].toString();
	}
	if (json['Describe'] != null) {
		data.describe = json['Describe'].toString();
	}
	if (json['ImportName'] != null) {
		data.importName = json['ImportName'].toString();
	}
	if (json['Limit_time'] != null) {
		data.limitTime = json['Limit_time'] is String
				? int.tryParse(json['Limit_time'])
				: json['Limit_time'].toInt();
	}
	if (json['StateName'] != null) {
		data.stateName = json['StateName'].toString();
	}
	if (json['HBName'] != null) {
		data.hBName = json['HBName'].toString();
	}
	if (json['ifyq'] != null) {
		data.ifyq = json['ifyq'].toString();
	}
	if (json['RegionName'] != null) {
		data.regionName = json['RegionName'].toString();
	}
	if (json['Department_name'] != null) {
		data.departmentName = json['Department_name'].toString();
	}
	if (json['GDCreateDate'] != null) {
		data.gDCreateDate = json['GDCreateDate'].toString();
	}
	if (json['CreateUserName'] != null) {
		data.createUserName = json['CreateUserName'].toString();
	}
	if (json['FromTypeName'] != null) {
		data.fromTypeName = json['FromTypeName'].toString();
	}
	if (json['Department_id'] != null) {
		data.departmentId = json['Department_id'] is String
				? int.tryParse(json['Department_id'])
				: json['Department_id'].toInt();
	}
	if (json['RUserName'] != null) {
		data.rUserName = json['RUserName'].toString();
	}
	if (json['SHStateName'] != null) {
		data.sHStateName = json['SHStateName'].toString();
	}
	if (json['RowIndex'] != null) {
		data.rowIndex = json['RowIndex'] is String
				? int.tryParse(json['RowIndex'])
				: json['RowIndex'].toInt();
	}
	return data;
}

Map<String, dynamic> delayDataDataToJson(DelayDataData entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['ID'] = entity.iD;
	data['LSH'] = entity.lSH;
	data['User_id'] = entity.userId;
	data['Reason'] = entity.reason;
	data['BHReason'] = entity.bHReason;
	data['State'] = entity.state;
	data['Flag'] = entity.flag;
	data['CreateDate'] = entity.createDate;
	data['CreateUserId'] = entity.createUserId;
	data['UpdateDate'] = entity.updateDate;
	data['UpdateUserId'] = entity.updateUserId;
	data['All_name'] = entity.allName;
	data['TypeName'] = entity.typeName;
	data['Link_man'] = entity.linkMan;
	data['Link_phone'] = entity.linkPhone;
	data['Describe'] = entity.describe;
	data['ImportName'] = entity.importName;
	data['Limit_time'] = entity.limitTime;
	data['StateName'] = entity.stateName;
	data['HBName'] = entity.hBName;
	data['ifyq'] = entity.ifyq;
	data['RegionName'] = entity.regionName;
	data['Department_name'] = entity.departmentName;
	data['GDCreateDate'] = entity.gDCreateDate;
	data['CreateUserName'] = entity.createUserName;
	data['FromTypeName'] = entity.fromTypeName;
	data['Department_id'] = entity.departmentId;
	data['RUserName'] = entity.rUserName;
	data['SHStateName'] = entity.sHStateName;
	data['RowIndex'] = entity.rowIndex;
	return data;
}